﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Lesson15 : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        ScrollRect sr = this.GetComponent<ScrollRect>();
        sr.content.sizeDelta = new Vector2(200, 200);
        sr.normalizedPosition = new Vector2(0, 0.5f);
        sr.onValueChanged.AddListener((v)=>{
            Debug.LogFormat("Code Control ChangeVlaue v:{0}", v);
        });
        //sr.onValueChanged.AddListener(ChangeVlaue);
        //sr.onValueChanged.RemoveListener(ChangeVlaue);
        //sr.onValueChanged.RemoveAllListeners();
    }

    public void ChangeVlaue(Vector2 v)
    {
        Debug.LogFormat("ChangeVlaue v:{0}", v);
    }
}
